<template>
  <div class="">
    <el-button type="primary" @click="emitEvent">触发mitt定义的bus</el-button>
  </div>
</template>

<script setup lang="ts">
import  {getCurrentInstance} from 'vue'
const instance= getCurrentInstance()  // 获取组件实例，相当于配置选项的this

function emitEvent () {
  instance?.proxy?.$Bus.emit('on-btn-click','我是mitt bus触发的事件')
}

</script>

<style scoped lang="scss">
</style>